﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/MobiMap.Master" AutoEventWireup="true" CodeBehind="ResultService.aspx.cs" Inherits="MobiMap.Guest.ResultService" %>
<asp:Content ID="ctHead" ContentPlaceHolderID="head" runat="server">
    <title>Result Service</title>
    <script type="text/javascript">
 
        function test(longitude, latitude)
        {
            alert(longitude + ", " + latitude);
            return false;
        }
        
        function SelectRow(idxRow)
        {    
            var e = e ? e : window.event;
            var KeyCode = e.which ? e.which : e.keyCode;
            //alert(idxRow + "   " + KeyCode);

            if (KeyCode == 40)
                MarkRow(idxRow, idxRow+1);
            else if (KeyCode == 38)
                MarkRow(idxRow, idxRow-1);
        }
        
       
        function MarkRow(oldRow, newRow)
        {
            if (document.getElementById(newRow) == null)
                return;
           
            if (document.getElementById(oldRow) != null )
                document.getElementById(oldRow).style.backgroundColor = '';
 
            document.getElementById(newRow).style.backgroundColor = '#FC8F00';
        }
   
    </script>
</asp:Content>

<asp:Content ID="ctMain" ContentPlaceHolderID="mainArea" runat="server">
    
<div class="addressResult_wrapper" id="addrResult" runat="server">

    <div class="addressResult_title">
        <asp:Label ID="lbKeyWord" runat="server" Text="Label"></asp:Label>
    </div>    
    
    <div id="gvServiceContainer">
    <asp:GridView ID="gvService" runat="server" AutoGenerateColumns="False" 
        CellPadding="0" CellSpacing="0"  GridLines="None" Width="100%" BorderWidth="0"
        AllowPaging="True" ShowHeader="False"  HorizontalAlign="Left" 
            onpageindexchanging="gvService_PageIndexChanging" Font-Size="12px" PagerSettings-PageButtonCount="7" PagerSettings-Mode="NextPrevious" PagerSettings-NextPageText="Next" PagerSettings-PreviousPageText="Previous">

        <RowStyle CssClass="oddRow" HorizontalAlign="Left"/>
        <Columns>            
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton ID="lbtService" runat="server" OnClick="lbtService_Click" CssClass="linkButton">
                    <div class="rowInfo">
                        <asp:Label id="lbFullName" runat ="server" Text='<%# DataBinder.Eval(Container.DataItem, "FullName") %>'></asp:Label><br />
                        <asp:Label id="lbAddress" runat ="server" Text='<%# DataBinder.Eval(Container.DataItem, "Address") %>'></asp:Label>                        
                        <asp:Label Visible="false" id="lbLongitude" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Location.Longitude") %>'></asp:Label>
                        <asp:Label Visible="false" id="lbLatitude" runat ="server" Text='<%# DataBinder.Eval(Container.DataItem, "Location.Latitude") %>'></asp:Label>
                        <asp:Label Visible="false" id="serID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ID") %>'></asp:Label>
                    </div>
                    </asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>            
        </Columns>

<PagerSettings></PagerSettings>

        <PagerStyle HorizontalAlign="Left" Font-Underline="True"/>        
        <AlternatingRowStyle CssClass="evenRow"/>
    </asp:GridView>
       
    </div>

   
    <asp:Button ID="Button1" runat="server" Text="Show All" OnClick = "All_Click" />


</div>
</asp:Content>
